<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page db_functions.inc</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name"><img src="../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/includes/db_functions.inc</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This include file contains the functions that our web app calls. (Main Functionallity)</p>
		
			</div>
</div>
		

	
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functionaddComment" id="functionaddComment"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">addComment</span> (line <span class="line-number">140</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function adds the comment information sent by user into the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addComment
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$user_id</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$park_id</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$comment</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$user_id</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$park_id</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$comment</span>			</li>
				</ul>
		
	
</div>
<a name="functionaddProposal" id="functionaddProposal"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">addProposal</span> (line <span class="line-number">86</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function adds the proposal information sent by user into the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addProposal
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$user_id</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$comment</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$address</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$suburb_id</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$user_id</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$comment</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$address</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$suburb_id</span>			</li>
				</ul>
		
	
</div>
<a name="functionaddRating" id="functionaddRating"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">addRating</span> (line <span class="line-number">165</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function adds the rating information sent by user into the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addRating
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$user_id</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$park_id</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$rating</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$user_id</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$park_id</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$rating</span>			</li>
				</ul>
		
	
</div>
<a name="functionaddReport" id="functionaddReport"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">addReport</span> (line <span class="line-number">114</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function adds the report information sent by user into the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addReport
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$user_id</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$park_id</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$report</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$user_id</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$park_id</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$report</span>			</li>
				</ul>
		
	
</div>
<a name="functiondeleteComment" id="functiondeleteComment"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">deleteComment</span> (line <span class="line-number">252</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function deletes the comment information from the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			deleteComment
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$comment_id</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$comment_id</span>			</li>
				</ul>
		
	
</div>
<a name="functiongetComments" id="functiongetComments"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getComments</span> (line <span class="line-number">220</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function gets the comment information sent by user into the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getComments
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$park_id</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$start</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$limit</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$user_id</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$user_id</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$park_id</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$limit</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$start</span>			</li>
				</ul>
		
	
</div>
<a name="functiongetDistinctEquip" id="functiongetDistinctEquip"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getDistinctEquip</span> (line <span class="line-number">27</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function calls and collects unique equipment information.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getDistinctEquip
		</span>
				()
			</div>

		
	
</div>
<a name="functiongetEquipment" id="functiongetEquipment"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getEquipment</span> (line <span class="line-number">274</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function gets the equipment information from the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getEquipment
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$park_id</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$park_id</span>			</li>
				</ul>
		
	
</div>
<a name="functiongetParkInfo" id="functiongetParkInfo"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getParkInfo</span> (line <span class="line-number">374</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function retrieves the park information from the database. Information includes Park ID, name, suburb, name, type</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getParkInfo
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$park_id</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$park_id</span>			</li>
				</ul>
		
	
</div>
<a name="functiongetParks" id="functiongetParks"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getParks</span> (line <span class="line-number">304</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function gets the equipment information from the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getParks
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$qry</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$start</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$limit</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$qry</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$start</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$limit</span>			</li>
				</ul>
		
	
</div>
<a name="functiongetParkTypes" id="functiongetParkTypes"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getParkTypes</span> (line <span class="line-number">9</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function calls and collects unique park type information.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getParkTypes
		</span>
				()
			</div>

		
	
</div>
<a name="functiongetRegions" id="functiongetRegions"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getRegions</span> (line <span class="line-number">64</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function calls and collects unique region information and orders in alphabetical order.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getRegions
		</span>
				()
			</div>

		
	
</div>
<a name="functiongetResultsCount" id="functiongetResultsCount"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getResultsCount</span> (line <span class="line-number">357</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function counts and adds the results found.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getResultsCount
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$query</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$query</span>			</li>
				</ul>
		
	
</div>
<a name="functiongetSuburbs" id="functiongetSuburbs"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getSuburbs</span> (line <span class="line-number">46</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function calls and collects unique suburb information and orders in alphabetical order.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getSuburbs
		</span>
				()
			</div>

		
	
</div>
<a name="functiongetTop5" id="functiongetTop5"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">getTop5</span> (line <span class="line-number">331</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function gets the top 5 parks based on our rating system through the database, it uses the overall average rating.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getTop5
		</span>
				()
			</div>

		
	
</div>
<a name="functionhasRated" id="functionhasRated"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../media/images/Function.png" />
		<span class="method-title">hasRated</span> (line <span class="line-number">187</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function checks if the user has rated a park by checking the database.</p>
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			hasRated
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$user_id</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$park_id</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$user_id</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$park_id</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Thu, 14 Oct 2010 18:29:59 +1100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0a2</a>
	</p>
	</div></body>
</html>